package com.nbsaas.boot.cms.rest.convert;

import com.nbsaas.boot.cms.data.entity.ContentBlock;
import com.nbsaas.boot.cms.api.domain.simple.ContentBlockSimple;

import com.nbsaas.boot.rest.api.Converter;

/**
* 内容块-列表对象转换器
*/

public class ContentBlockSimpleConvert implements Converter<ContentBlockSimple, ContentBlock> {




@Override
public ContentBlockSimple convert(ContentBlock source) {
    ContentBlockSimple result = new ContentBlockSimple();

                result.setCode(source.getCode());
                result.setBlockType(source.getBlockType());
                result.setDescription(source.getDescription());
                result.setSort(source.getSort());
                result.setAddDate(source.getAddDate());
                result.setContent(source.getContent());
                result.setEnabled(source.getEnabled());
                result.setCacheTime(source.getCacheTime());
                result.setCssClass(source.getCssClass());
                result.setName(source.getName());
                result.setCustomJs(source.getCustomJs());
                result.setUseCount(source.getUseCount());
                result.setId(source.getId());
                result.setParameters(source.getParameters());
                result.setCustomCss(source.getCustomCss());
                result.setLastDate(source.getLastDate());


    return result;
}

}